import 'package:flutter/material.dart';
import 'package:untitled9/home_page.dart';
import 'package:untitled9/page.dart';
import 'package:dio/dio.dart';

class AirConditioningPage extends StatefulWidget {
  const AirConditioningPage({super.key});

  @override
  State<AirConditioningPage> createState() => _AirConditioningPageState();
}

class _AirConditioningPageState extends State<AirConditioningPage> {
  final dio = Dio();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        automaticallyImplyLeading: false,
        backgroundColor: Color.fromRGBO(195, 161, 162, 1.0),
        leading: Center(
            child: GestureDetector(
          onTap: () {
            Navigator.push(context, MaterialPageRoute(builder: (context) {
              return Page1();
            }));
          },
          child: Text(
            '<back',
            style: TextStyle(color: Colors.white),
          ),
        )),
        title: const Center(
            child: Text(
          'Air Conditioning',
          style: TextStyle(color: Colors.white),
        )),
        actions: [
          Text(
            'History',
            style: TextStyle(color: Colors.white),
          ),
          SizedBox(
            width: 5,
          )
        ],
      ),
      body: Container(
        margin: EdgeInsets.all(40),
        child: Column(
          children: [
            Container(
              height: 180,
              decoration: BoxDecoration(
                  color: Color.fromRGBO(234, 224, 225, 1.0),
                  borderRadius: BorderRadius.circular(20)),
              child: Column(
                children: [
                  Container(
                    height: 150,
                    child: const Center(
                      child: Text(
                        '16',
                        style: TextStyle(
                            fontSize: 30, fontWeight: FontWeight.w800),
                      ),
                    ),
                  ),
                  Container(
                    margin: EdgeInsets.symmetric(horizontal: 20),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text(
                          'Mode:Cold',
                          style: TextStyle(fontWeight: FontWeight.w800),
                        ),
                        Text(
                          'Speed:1',
                          style: TextStyle(fontWeight: FontWeight.w800),
                        )
                      ],
                    ),
                  )
                ],
              ),
            ),
            SizedBox(
              height: 50,
            ),
            Container(
              height: 200,
              margin: EdgeInsets.symmetric(horizontal: 20),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Container(
                    height: 200,
                    width: 80,
                    decoration: BoxDecoration(
                        color: Color.fromRGBO(234, 224, 225, 1.0),
                        borderRadius: BorderRadius.circular(40)),
                    child: Column(
                      children: [
                        Expanded(
                            child: Container(
                          child: Center(
                            child: Text('+',
                                style: TextStyle(
                                    fontWeight: FontWeight.w800, fontSize: 40)),
                          ),
                        )),
                        Container(
                          height: 1,
                          color: Colors.white,
                        ),
                        Expanded(
                            child: Container(
                          child: Center(
                            child: Text('-',
                                style: TextStyle(
                                    fontWeight: FontWeight.w800, fontSize: 40)),
                          ),
                        )),
                      ],
                    ),
                  ),
                  Container(
                    margin: EdgeInsets.symmetric(vertical: 5),
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Container(
                          width: 80,
                          height: 80,
                          decoration: BoxDecoration(
                              color: Color.fromRGBO(234, 224, 225, 1.0),
                              borderRadius: BorderRadius.circular(40)),
                          child: Center(
                              child: Text(
                            'Mode',
                            style: TextStyle(fontWeight: FontWeight.w800),
                          )),
                        ),
                        Container(
                          width: 80,
                          height: 80,
                          decoration: BoxDecoration(
                              color: Color.fromRGBO(234, 224, 225, 1.0),
                              borderRadius: BorderRadius.circular(40)),
                          child: Center(
                              child: Text(
                            'Speed',
                            style: TextStyle(fontWeight: FontWeight.w800),
                          )),
                        ),
                      ],
                    ),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
